YES 3.248
H-Termination proof of /home/matraf/haskell/eval_FullyBlown_Fast/empty.hs
H-Termination of the given Haskell-Program with start terms could successfully be proven:
↳ HASKELL
↳ LR
mainModule Main
| ((index :: (Ordering,Ordering) -> Ordering -> Int) :: (Ordering,Ordering) -> Ordering -> Int) |
module Main where
Lambda Reductions:
The following Lambda expression
\s→if y > s then 1 else 0
is transformed to
index0 | y s | = if y > s then 1 else 0 |
The following Lambda expression
\z→if y >= z && z >= x then z : [] else []
is transformed to
range0 | y x z | = if y >= z && z >= x then z : [] else [] |
↳ HASKELL
↳ LR
↳ HASKELL
↳ IFR
mainModule Main
| ((index :: (Ordering,Ordering) -> Ordering -> Int) :: (Ordering,Ordering) -> Ordering -> Int) |
module Main where
If Reductions:
The following If expression
if y > s then 1 else 0
is transformed to
index00 | True | = 1 |
index00 | False | = 0 |
The following If expression
if y >= z && z >= x then z : [] else []
is transformed to
range00 | z True | = z : [] |
range00 | z False | = [] |
The following If expression
if y >= z && z >= x then sum (map (index0 y) (range (x,y))) else error []
is transformed to
index1 | y x True | = sum (map (index0 y) (range (x,y))) |
index1 | y x False | = error [] |
↳ HASKELL
↳ LR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
mainModule Main
| ((index :: (Ordering,Ordering) -> Ordering -> Int) :: (Ordering,Ordering) -> Ordering -> Int) |
module Main where
Replaced joker patterns by fresh variables and removed binding patterns.
↳ HASKELL
↳ LR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
mainModule Main
| ((index :: (Ordering,Ordering) -> Ordering -> Int) :: (Ordering,Ordering) -> Ordering -> Int) |
module Main where
Cond Reductions:
The following Function with conditions
compare | x y |
| | x == y | |
| | x <= y | |
| | otherwise | |
|
is transformed to
compare | x y | = compare3 x y |
compare2 | x y True | = EQ |
compare2 | x y False | = compare1 x y (x <= y) |
compare1 | x y True | = LT |
compare1 | x y False | = compare0 x y otherwise |
compare3 | x y | = compare2 x y (x == y) |
The following Function with conditions
is transformed to
undefined0 | True | = undefined |
undefined1 | | = undefined0 False |
↳ HASKELL
↳ LR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ NumRed
mainModule Main
| ((index :: (Ordering,Ordering) -> Ordering -> Int) :: (Ordering,Ordering) -> Ordering -> Int) |
module Main where
Num Reduction: All numbers are transformed to thier corresponding representation with Pos, Neg, Succ and Zero.
↳ HASKELL
↳ LR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
mainModule Main
| (index :: (Ordering,Ordering) -> Ordering -> Int) |
module Main where
Haskell To QDPs
↳ HASKELL
↳ LR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_primMinusNat(Succ(vx700), Succ(vx800)) → new_primMinusNat(vx700, vx800)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_primMinusNat(Succ(vx700), Succ(vx800)) → new_primMinusNat(vx700, vx800)
The graph contains the following edges 1 > 1, 2 > 2
↳ HASKELL
↳ LR
↳ HASKELL
↳ IFR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ NumRed
↳ HASKELL
↳ Narrow
↳ AND
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
Q DP problem:
The TRS P consists of the following rules:
new_primPlusNat(Succ(vx700), Succ(vx800)) → new_primPlusNat(vx700, vx800)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_primPlusNat(Succ(vx700), Succ(vx800)) → new_primPlusNat(vx700, vx800)
The graph contains the following edges 1 > 1, 2 > 2